package com.qo.qsdk.model;

import java.util.ArrayList;
import java.util.List;

public class HisModel {

    public static enum ITEM_TYPE {
        ITEM_TYPE_SECTION,
        ITEM_TYPE_ITEM
    }

    public static enum ACCOUNT_TYPE {
        Google,
        Apple,
        Facebook,
        Guest,
        Account;
    }

    private ITEM_TYPE itemType;
    private ACCOUNT_TYPE type;
    private String account;
    private String server;
    private String level;
    private String role;
    private int account_type;


    private List<HisSubModel> roles;

    public List<HisSubModel> getRoles() {
        return roles == null ? new ArrayList<HisSubModel>() : roles;
    }

    public int getAccount_type() {
        return account_type;
    }

    public void setAccount_type(int account_type) {
        this.account_type = account_type;
    }

    public void setRoles(List<HisSubModel> roles) {
        this.roles = roles;
    }

    public static class HisSubModel {
        private String account;
        private int account_type;
        private String level;
        private String role_name;
        private String server_name;
        private String user_id;

        public String getAccount() {
            return account == null ? "" : account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public int getAccount_type() {
            return account_type;
        }

        public void setAccount_type(int account_type) {
            this.account_type = account_type;
        }

        public String getRole_level() {
            return level == null ? "" : level;
        }

        public void setRole_level(String role_level) {
            this.level = role_level;
        }

        public String getRole_name() {
            return role_name == null ? "" : role_name;
        }

        public void setRole_name(String role_name) {
            this.role_name = role_name;
        }

        public String getServer_name() {
            return server_name == null ? "" :server_name;
        }

        public void setServer_name(String server_name) {
            this.server_name = server_name;
        }

        public String getUser_id() {
            return user_id == null ? "" : user_id;
        }

        public void setUser_id(String user_id) {
            this.user_id = user_id;
        }
    }

    public ACCOUNT_TYPE getType() {
        return type;
    }

    public void setType(ACCOUNT_TYPE type) {
        this.type = type;
    }

    public String getServer() {
        return server == null ? " " : server;
    }

    public void setServer(String server) {
        this.server = server;
    }

    public String getLevel() {
        return level == null ? " " : level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getRole() {
        return role == null ? " " : role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getAccount() {
        return account == null ? "" : account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public HisModel(ITEM_TYPE type, ACCOUNT_TYPE accountType, String account) {
        this.itemType = type;
        this.account= account;
        this.type = accountType;
    }

    public HisModel(ITEM_TYPE type, String server, String role, String level) {
        this.itemType = type;
        this.role = role;
        this.server = server;
        this.level = level;
    }

    public ITEM_TYPE getItemType() {
        return itemType;
    }
}
